/* eslint-disable */
// @ts-ignore
import request from '@/utils/http';

import * as API from './types';

/** 删除部门 POST /api/dept/deleteData */
export async function apiDeptDeleteDataUsingPost({
  body,
  options,
}: {
  body: API.ApiDeptBoApiDeptDeleteData;
  options?: { [key: string]: unknown };
}) {
  return request<API.RBoolean>('/api/dept/deleteData', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 获取 POST /api/dept/getData */
export async function apiDeptGetDataUsingPost({
  body,
  options,
}: {
  body: API.ApiDeptBoApiDeptGetData;
  options?: { [key: string]: unknown };
}) {
  return request<API.RApiDeptVo>('/api/dept/getData', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 添加 POST /api/dept/saveData */
export async function apiDeptSaveDataUsingPost({
  body,
  options,
}: {
  body: API.ApiDeptBoApiDeptSaveData;
  options?: { [key: string]: unknown };
}) {
  return request<API.RLong>('/api/dept/saveData', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 树形结构获取 POST /api/dept/treeData */
export async function apiDeptTreeDataUsingPost({
  options,
}: {
  options?: { [key: string]: unknown };
}) {
  return request<API.RListApiDeptTreeVo>('/api/dept/treeData', {
    method: 'POST',
    ...(options || {}),
  });
}

/** 部门修改 POST /api/dept/updateData */
export async function apiDeptUpdateDataUsingPost({
  body,
  options,
}: {
  body: API.ApiDeptBoApiDeptUpdateData;
  options?: { [key: string]: unknown };
}) {
  return request<API.RBoolean>('/api/dept/updateData', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
